import { VirtualList, DataControl } from "./VirtualList/VirtualList";


const { ccclass, property, disallowMultiple, menu } = cc._decorator;


@ccclass @disallowMultiple @menu('测试案例/ListControl')

export class ListControl extends cc.Component {


    @property(VirtualList)
    virtualList: VirtualList = null;


    //------------------------------------------



    onLoad() {

        let dataSource = Array(50).fill(0).map((val, i) => i + 1);

        this.virtualList.dataControl = new DataControl(dataSource);

    }



}